package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;

import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author HuangLu
 * @since 2019-02-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class BarRegister extends Model<BarRegister> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "register_id", type = IdType.AUTO)
    private Long registerId;

    /**
     * imei
     */
    private String imei;

    private String sim;
    /**
     * 型号
     */
    private String model;

    /**
     * 制作单位
     */
    private String productUnit;

    /**
     * 制作日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime productDate;

    /**
     * 安装路段
     */
    private String installRoad;

    /**
     * 位号编码
     */
    private String installCode;

    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime registerTime;

    /**
     * 注册成功时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime successTime;

    /**
     * 数据创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDate;



    @Override
    protected Serializable pkVal() {
        return this.registerId;
    }

    @Override
    public String toString() {
        return "BarRegister{" +
        "registerId=" + registerId +
        ", imei=" + imei +
        ", model=" + model +
        ", productUnit=" + productUnit +
        ", productDate=" + productDate +
        ", installRoad=" + installRoad +
        ", installCode=" + installCode +
        ", registerTime=" + registerTime +
        ", successTime=" + successTime +
        ", createDate=" + createDate +
        "}";
    }
}
